<?php

namespace common\entities\outstock;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_out_stock_attachment".
 *
 * @property string $id
 * @property string $order_id
 * @property string $path
 * @property string $filename
 * @property string $created_on
 * @property string $created_by
 */
class MyscrmOutStockAttachmentEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_out_stock_attachment';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'order_id', 'path'], 'required'],
            [['created_on'], 'safe'],
            [['id', 'order_id', 'created_by'], 'string', 'max' => 36],
            [['path', 'filename'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'order_id' => '单据ID',
            'path' => '文件路径',
            'filename' => '文件名',
            'created_on' => '创建时间',
            'created_by' => '创建人',
        ];
    }
}
